// interface ObjectA {
//   a:string
// }

// interface ObjectB {
//   b:string
// }

// let Aa: ObjectA ={
//   a:'a'
// }

// let Bb: ObjectB = {
//   b:'b'
// }
// const AB:ObjectA & ObjectB = Object.assign(Aa, Bb)
// console.log(AB);

class ClassAa{
  isA!: boolean
  funcA(){}
}
class ClassBb{
  isB!: boolean
  funcB() {}
}

class AB implements ClassAa, ClassBb {
  isA: boolean = false
  isB: boolean = false
  public funcA!: () => void
  public funcB!: () => void
  constructor() {}
  
}
function mixins(base: any, from: any[]) {
  from.forEach((fromItem) => {
    Object.getOwnPropertyNames(fromItem.prototype).forEach((key) => {
      console.log(key);
      base.prototype[key] = fromItem.prototype[key]
     })
   })
}
mixins(AB, [ClassBb, ClassAa])
console.log(AB.prototype.constructor,'111111111');

const ab = new AB()
console.log(ab);
